#ifndef __NET_QUEUE__
#define __NET_QUEUE__

#include <QObject>
#include <QByteArray>
#include <QTimer>
#include <QByteArray>

class NetQueue : public QObject
{
  Q_OBJECT

public:
  NetQueue (int latency, int throughput);

  void clear ();

public slots:
  void queue_data (const QByteArray& data);

signals:
  void data_ready (QByteArray data);

private slots:
  void timeout ();

private:
  int _latency;
  int _packet_size;
  QTimer _timer;
  QByteArray _queue;
};

#endif /* __NET_QUEUE__ */
